<template>
  <view class="classifyMain pageBg">
    <custom-nav-bar title="分类"></custom-nav-bar>
    <view class="classify">
      <theme-item v-for="classify in classifyList" :key="classify._id" :name="classify.name" :picurl="classify.picurl"
        :updateTime="classify.updateTime" :classifyId="classify._id"></theme-item>
    </view>
  </view>
</template>

<script lang="ts" setup>
import { ref } from 'vue';
import type { Classify } from '@/api/classify';
import { apiGetClassify } from '@/api/classify';
const classifyList = ref<Classify[]>([]);



const getClassify = async () => {
  const res = await apiGetClassify({ pageSize: 15 })
  classifyList.value = res.data
}

getClassify()
</script>

<style lang="scss" scoped>
.classify {
  padding: 30rpx;
  display: grid;
  gap: 15rpx;
  grid-template-columns: repeat(3, 1fr);
}
</style>
